<script setup lang="ts">
import router from "@/router";

import { ref } from "vue";

const activeIndex = ref("/allorders");
const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
const changContent = (path: string) => {
  activeIndex.value = path;
  router.push(path);
};
</script>

<template>
  <el-menu
    :default-active="activeIndex"
    class="el-menu-demo"
    mode="horizontal"
    @select="handleSelect"
    router="true"
  >
    <el-menu-item index="/allorders">全部订单</el-menu-item>
    <el-menu-item index="/hasorders">已支付</el-menu-item>
    <el-menu-item index="/noorders">未支付</el-menu-item>
  </el-menu>
</template>

<style scoped></style>
